/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.GUI.setting;

import java.awt.Component;
import ac.lib.tools.files;
import ac.ui.custemItmes;
import ac.uitls.propertiesOperation;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;

/**
 *
 * @author ismail
 */
public class usersSetting extends ac.ui.controls.PCLPanel implements ac.settings.permissions {

    /**
     * Creates new form usersSetting
     */
    ac.engin.setting.usersSetting u = new ac.engin.setting.usersSetting();
    propertiesOperation po = new propertiesOperation();

    public usersSetting() {
        initComponents();
        onLoad();
        updatePList();

        preitems();
        u.indexUpdate();
        userstem();
        u.indexUpdate();
    }

    // <editor-fold defaultstate="collapsed" desc="Users Code">
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pCLTabs1 = new ac.ui.controls.PCLTabs();
        pCLPanel1 = new ac.ui.controls.PCLPanel();
        left_panel = new ac.ui.controls.PCLPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtb_index = new ac.ui.controls.PCLTable();
        pCLToolbar1 = new ac.ui.controls.PCLToolbar();
        jbt_frist = new ac.ui.controls.PCLButton();
        jbt_prev = new ac.ui.controls.PCLButton();
        jlb_indexinfo = new ac.ui.controls.PCLLabel();
        jbt_next = new ac.ui.controls.PCLButton();
        jbt_last = new ac.ui.controls.PCLButton();
        right_panel = new ac.ui.controls.PCLPanel();
        pCLToolbar2 = new ac.ui.controls.PCLToolbar();
        jbt_add = new ac.ui.controls.PCLButton();
        jbt_edit = new ac.ui.controls.PCLButton();
        jbt_delete = new ac.ui.controls.PCLButton();
        jbt_cancel = new ac.ui.controls.PCLButton();
        jtxt_username = new ac.ui.controls.PCLTextField();
        pCLLabel5 = new ac.ui.controls.PCLLabel();
        pCLLabel6 = new ac.ui.controls.PCLLabel();
        pCLLabel7 = new ac.ui.controls.PCLLabel();
        jpa_Password = new ac.ui.controls.PCLPasswordField();
        jpa_Passwordrep = new ac.ui.controls.PCLPasswordField();
        jcom_lang = new ac.ui.controls.PCLcomboBox();
        pCLLabel8 = new ac.ui.controls.PCLLabel();
        jcom_userType = new ac.ui.controls.PCLcomboboxAdd();
        pCLLabel9 = new ac.ui.controls.PCLLabel();
        pCLPanel2 = new ac.ui.controls.PCLPanel();
        pCLPanel5 = new ac.ui.controls.PCLPanel();
        pCLPanel4 = new ac.ui.controls.PCLPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jlist_actions = new ac.ui.controls.PCLList();
        pCLPanel3 = new ac.ui.controls.PCLPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jlst_forms = new ac.ui.controls.PCLList();
        jcom_userTypep = new ac.ui.controls.PCLcomboboxAdd();
        pCLLabel10 = new ac.ui.controls.PCLLabel();
        pCLToolbar3 = new ac.ui.controls.PCLToolbar();
        jbt_add1 = new ac.ui.controls.PCLButton();
        jbt_edit1 = new ac.ui.controls.PCLButton();
        jbt_delete1 = new ac.ui.controls.PCLButton();
        jbt_cancel1 = new ac.ui.controls.PCLButton();
        left_panel1 = new ac.ui.controls.PCLPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jtb_index1 = new ac.ui.controls.PCLTable();
        pCLToolbar4 = new ac.ui.controls.PCLToolbar();
        jbt_frist1 = new ac.ui.controls.PCLButton();
        jbt_prev1 = new ac.ui.controls.PCLButton();
        jlb_indexinfo1 = new ac.ui.controls.PCLLabel();
        jbt_next1 = new ac.ui.controls.PCLButton();
        jbt_last1 = new ac.ui.controls.PCLButton();

        setType("users");
        setPreferredSize(new java.awt.Dimension(558, 360));

        pCLTabs1.setPreferredSize(new java.awt.Dimension(558, 360));

        pCLPanel1.setPreferredSize(new java.awt.Dimension(553, 473));

        left_panel.setPreferredSize(new java.awt.Dimension(200, 282));

        jtb_index.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jtb_index.setType("index");
        jtb_index.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtb_indexMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jtb_index);

        pCLToolbar1.setRollover(true);

        jbt_frist.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ac/images/last.png"))); // NOI18N
        jbt_frist.setFocusable(false);
        jbt_frist.setHorizontalTextPosition(0);
        jbt_frist.setMargin(new java.awt.Insets(5, 10, 5, 10));
        jbt_frist.setVerticalTextPosition(3);
        jbt_frist.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_fristActionPerformed(evt);
            }
        });
        pCLToolbar1.add(jbt_frist);

        jbt_prev.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ac/images/next.png"))); // NOI18N
        jbt_prev.setFocusable(false);
        jbt_prev.setHorizontalTextPosition(0);
        jbt_prev.setMargin(new java.awt.Insets(5, 10, 5, 10));
        jbt_prev.setVerticalTextPosition(3);
        jbt_prev.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_prevActionPerformed(evt);
            }
        });
        jbt_prev.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jbt_prevMouseClicked(evt);
            }
        });
        pCLToolbar1.add(jbt_prev);

        jlb_indexinfo.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jlb_indexinfo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jlb_indexinfo.setText("/");
        jlb_indexinfo.setMaximumSize(new java.awt.Dimension(70, 25));
        jlb_indexinfo.setType("rowData");
        pCLToolbar1.add(jlb_indexinfo);

        jbt_next.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ac/images/prev.png"))); // NOI18N
        jbt_next.setFocusable(false);
        jbt_next.setHorizontalTextPosition(0);
        jbt_next.setMargin(new java.awt.Insets(5, 10, 5, 10));
        jbt_next.setVerticalTextPosition(3);
        jbt_next.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_nextActionPerformed(evt);
            }
        });
        pCLToolbar1.add(jbt_next);

        jbt_last.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ac/images/frist.png"))); // NOI18N
        jbt_last.setFocusable(false);
        jbt_last.setHorizontalTextPosition(0);
        jbt_last.setMargin(new java.awt.Insets(5, 10, 5, 10));
        jbt_last.setVerticalTextPosition(3);
        jbt_last.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_lastActionPerformed(evt);
            }
        });
        pCLToolbar1.add(jbt_last);

        javax.swing.GroupLayout left_panelLayout = new javax.swing.GroupLayout(left_panel);
        left_panel.setLayout(left_panelLayout);
        left_panelLayout.setHorizontalGroup(
            left_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, left_panelLayout.createSequentialGroup()
                .addComponent(jScrollPane1)
                .addGap(12, 12, 12))
            .addGroup(left_panelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pCLToolbar1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addContainerGap())
        );
        left_panelLayout.setVerticalGroup(
            left_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(left_panelLayout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pCLToolbar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pCLToolbar2.setRollover(true);

        jbt_add.setType("add");
        jbt_add.setFocusable(false);
        jbt_add.setText("jbt_add");
        jbt_add.setVerticalTextPosition(3);
        jbt_add.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_addActionPerformed(evt);
            }
        });
        pCLToolbar2.add(jbt_add);

        jbt_edit.setType("edit");
        jbt_edit.setFocusable(false);
        jbt_edit.setText("jbt_edit");
        jbt_edit.setVerticalTextPosition(3);
        jbt_edit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_editActionPerformed(evt);
            }
        });
        pCLToolbar2.add(jbt_edit);

        jbt_delete.setType("delete");
        jbt_delete.setFocusable(false);
        jbt_delete.setText("jbt_delete");
        jbt_delete.setVerticalTextPosition(3);
        jbt_delete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_deleteActionPerformed(evt);
            }
        });
        pCLToolbar2.add(jbt_delete);

        jbt_cancel.setType("delete");
        jbt_cancel.setFocusable(false);
        jbt_cancel.setText("jbt_cancel");
        jbt_cancel.setVerticalTextPosition(3);
        jbt_cancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_cancelActionPerformed(evt);
            }
        });
        pCLToolbar2.add(jbt_cancel);

        jtxt_username.setRequired(true);

        pCLLabel5.setText("jbl_userName");

        pCLLabel6.setText("jbl_password");

        pCLLabel7.setText("jbl_repPassword");

        jpa_Password.setRequired(true);

        jpa_Passwordrep.setRequired(true);

        jcom_lang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcom_langActionPerformed(evt);
            }
        });

        pCLLabel8.setText("jbl_lang");

        jcom_userType.setAddtype("user_type");
        jcom_userType.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcom_userTypeActionPerformed(evt);
            }
        });

        pCLLabel9.setText("jbl_userTyp");

        javax.swing.GroupLayout right_panelLayout = new javax.swing.GroupLayout(right_panel);
        right_panel.setLayout(right_panelLayout);
        right_panelLayout.setHorizontalGroup(
            right_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pCLToolbar2, javax.swing.GroupLayout.DEFAULT_SIZE, 553, Short.MAX_VALUE)
            .addGroup(right_panelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(right_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(pCLLabel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pCLLabel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 88, Short.MAX_VALUE)
                    .addComponent(pCLLabel8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pCLLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pCLLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(right_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jpa_Password, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jpa_Passwordrep, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jtxt_username, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jcom_userType, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jcom_lang, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        right_panelLayout.setVerticalGroup(
            right_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, right_panelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(right_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxt_username, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pCLLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(right_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(pCLLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jpa_Password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(right_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(pCLLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jpa_Passwordrep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(right_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jcom_lang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pCLLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(right_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jcom_userType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pCLLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(pCLToolbar2, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(56, Short.MAX_VALUE))
        );

        pCLLabel7.getAccessibleContext().setAccessibleName("jbl_passwordRep");

        javax.swing.GroupLayout pCLPanel1Layout = new javax.swing.GroupLayout(pCLPanel1);
        pCLPanel1.setLayout(pCLPanel1Layout);
        pCLPanel1Layout.setHorizontalGroup(
            pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(left_panel, javax.swing.GroupLayout.DEFAULT_SIZE, 553, Short.MAX_VALUE)
            .addComponent(right_panel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        pCLPanel1Layout.setVerticalGroup(
            pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel1Layout.createSequentialGroup()
                .addComponent(left_panel, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(right_panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pCLTabs1.addTab("tab1", pCLPanel1);

        pCLPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("sss"));

        jScrollPane3.setViewportView(jlist_actions);

        javax.swing.GroupLayout pCLPanel4Layout = new javax.swing.GroupLayout(pCLPanel4);
        pCLPanel4.setLayout(pCLPanel4Layout);
        pCLPanel4Layout.setHorizontalGroup(
            pCLPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addContainerGap())
        );
        pCLPanel4Layout.setVerticalGroup(
            pCLPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE)
                .addContainerGap())
        );

        pCLPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("sss"));

        jScrollPane2.setViewportView(jlst_forms);

        javax.swing.GroupLayout pCLPanel3Layout = new javax.swing.GroupLayout(pCLPanel3);
        pCLPanel3.setLayout(pCLPanel3Layout);
        pCLPanel3Layout.setHorizontalGroup(
            pCLPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE)
                .addContainerGap())
        );
        pCLPanel3Layout.setVerticalGroup(
            pCLPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2)
                .addContainerGap())
        );

        jcom_userTypep.setAddtype("user_type");
        jcom_userTypep.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcom_userTypepActionPerformed(evt);
            }
        });

        pCLLabel10.setText("jbl_userTyp");

        pCLToolbar3.setRollover(true);

        jbt_add1.setType("add");
        jbt_add1.setFocusable(false);
        jbt_add1.setText("jbt_add");
        jbt_add1.setVerticalTextPosition(3);
        jbt_add1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_add1ActionPerformed(evt);
            }
        });
        pCLToolbar3.add(jbt_add1);

        jbt_edit1.setType("edit");
        jbt_edit1.setFocusable(false);
        jbt_edit1.setText("jbt_edit");
        jbt_edit1.setVerticalTextPosition(3);
        jbt_edit1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_edit1ActionPerformed(evt);
            }
        });
        pCLToolbar3.add(jbt_edit1);

        jbt_delete1.setType("delete");
        jbt_delete1.setFocusable(false);
        jbt_delete1.setText("jbt_delete");
        jbt_delete1.setVerticalTextPosition(3);
        jbt_delete1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_delete1ActionPerformed(evt);
            }
        });
        pCLToolbar3.add(jbt_delete1);

        jbt_cancel1.setType("delete");
        jbt_cancel1.setFocusable(false);
        jbt_cancel1.setText("jbt_cancel");
        jbt_cancel1.setVerticalTextPosition(3);
        jbt_cancel1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_cancel1ActionPerformed(evt);
            }
        });
        pCLToolbar3.add(jbt_cancel1);

        javax.swing.GroupLayout pCLPanel5Layout = new javax.swing.GroupLayout(pCLPanel5);
        pCLPanel5.setLayout(pCLPanel5Layout);
        pCLPanel5Layout.setHorizontalGroup(
            pCLPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pCLPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pCLPanel5Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(pCLPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(pCLPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(pCLPanel5Layout.createSequentialGroup()
                        .addComponent(pCLLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jcom_userTypep, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(pCLToolbar3, javax.swing.GroupLayout.DEFAULT_SIZE, 523, Short.MAX_VALUE))
                .addContainerGap())
        );
        pCLPanel5Layout.setVerticalGroup(
            pCLPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pCLPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jcom_userTypep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pCLLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pCLPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pCLPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pCLPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pCLToolbar3, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        left_panel1.setPreferredSize(new java.awt.Dimension(200, 282));

        jtb_index1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jtb_index1.setType("index");
        jtb_index1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtb_index1MouseClicked(evt);
            }
        });
        jScrollPane4.setViewportView(jtb_index1);

        pCLToolbar4.setRollover(true);

        jbt_frist1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ac/images/last.png"))); // NOI18N
        jbt_frist1.setFocusable(false);
        jbt_frist1.setHorizontalTextPosition(0);
        jbt_frist1.setMargin(new java.awt.Insets(5, 10, 5, 10));
        jbt_frist1.setVerticalTextPosition(3);
        jbt_frist1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_frist1ActionPerformed(evt);
            }
        });
        pCLToolbar4.add(jbt_frist1);

        jbt_prev1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ac/images/next.png"))); // NOI18N
        jbt_prev1.setFocusable(false);
        jbt_prev1.setHorizontalTextPosition(0);
        jbt_prev1.setMargin(new java.awt.Insets(5, 10, 5, 10));
        jbt_prev1.setVerticalTextPosition(3);
        jbt_prev1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_prev1ActionPerformed(evt);
            }
        });
        jbt_prev1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jbt_prev1MouseClicked(evt);
            }
        });
        pCLToolbar4.add(jbt_prev1);

        jlb_indexinfo1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jlb_indexinfo1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jlb_indexinfo1.setText("/");
        jlb_indexinfo1.setMaximumSize(new java.awt.Dimension(70, 25));
        jlb_indexinfo1.setType("rowData");
        pCLToolbar4.add(jlb_indexinfo1);

        jbt_next1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ac/images/prev.png"))); // NOI18N
        jbt_next1.setFocusable(false);
        jbt_next1.setHorizontalTextPosition(0);
        jbt_next1.setMargin(new java.awt.Insets(5, 10, 5, 10));
        jbt_next1.setVerticalTextPosition(3);
        jbt_next1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_next1ActionPerformed(evt);
            }
        });
        pCLToolbar4.add(jbt_next1);

        jbt_last1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ac/images/frist.png"))); // NOI18N
        jbt_last1.setFocusable(false);
        jbt_last1.setHorizontalTextPosition(0);
        jbt_last1.setMargin(new java.awt.Insets(5, 10, 5, 10));
        jbt_last1.setVerticalTextPosition(3);
        jbt_last1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_last1ActionPerformed(evt);
            }
        });
        pCLToolbar4.add(jbt_last1);

        javax.swing.GroupLayout left_panel1Layout = new javax.swing.GroupLayout(left_panel1);
        left_panel1.setLayout(left_panel1Layout);
        left_panel1Layout.setHorizontalGroup(
            left_panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, left_panel1Layout.createSequentialGroup()
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 541, Short.MAX_VALUE)
                .addGap(12, 12, 12))
            .addGroup(left_panel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pCLToolbar4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addContainerGap())
        );
        left_panel1Layout.setVerticalGroup(
            left_panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(left_panel1Layout.createSequentialGroup()
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pCLToolbar4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout pCLPanel2Layout = new javax.swing.GroupLayout(pCLPanel2);
        pCLPanel2.setLayout(pCLPanel2Layout);
        pCLPanel2Layout.setHorizontalGroup(
            pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(left_panel1, javax.swing.GroupLayout.DEFAULT_SIZE, 553, Short.MAX_VALUE)
            .addGroup(pCLPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pCLPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pCLPanel2Layout.setVerticalGroup(
            pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel2Layout.createSequentialGroup()
                .addComponent(left_panel1, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pCLPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pCLTabs1.addTab("tab2", pCLPanel2);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pCLTabs1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pCLTabs1, javax.swing.GroupLayout.DEFAULT_SIZE, 504, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents

    void userstem() {
        u.panels = new JPanel[]{right_panel};
        u.TabelString = "users";
        u.indexTitle = po.getWord("label.userName");
        u.index = jtb_index;
        u.indexField = "userName";
        u.dataComponents = new Component[]{jtxt_username, jpa_Passwordrep, jcom_lang, jcom_userType};
        u.dataSaveFields = new String[]{"userName", "password", "lang", "userType"};
        u.ActionsButtons.put("add", jbt_add);
        u.ActionsButtons.put("edit", jbt_edit);
        u.ActionsButtons.put("delete", jbt_delete);
        u.indexviewAs = "";
    }

    void preitems() {
        u.panels = new JPanel[]{pCLPanel5};
        u.TabelString = "permissions";
        u.indexTitle = po.getWord("label.userType");
        u.index = jtb_index1;
        u.indexField = "userType";

        u.indexviewAs = "addsID";
        u.dataComponents = new Component[]{jcom_userTypep, jlist_actions, jlst_forms};
        u.dataSaveFields = new String[]{"userType", "actions", "frames"};
        u.ActionsButtons.put("add", jbt_add1);
        u.ActionsButtons.put("edit", jbt_edit1);
        u.ActionsButtons.put("delete", jbt_delete1);

    }

    public void updatePList() {

        pCLPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.controlIn")));
        pCLTabs1.setTitleAt(0, po.getWord("label.usres"));
        pCLTabs1.setTitleAt(1, po.getWord("label.permissions"));

        pCLPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.actionsC")));
        String[] lanv = {"en", "ar"};
        String[] lant = {"Englesh", "عربي"};
        custemItmes.comBoxFills(jcom_lang, lanv, lant);
        custemItmes.listFills(jlst_forms, "sys_froms", "name", "title");

        ac.uitls.data d = new ac.uitls.data();
        custemItmes.listFills(jlist_actions, permissionsActions, d.updateArrayLang(permissionsActions));

    }


    private void jtb_indexMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtb_indexMouseClicked
        userstem();
        jlb_indexinfo.setText(u.FrameDataupdate());


    }//GEN-LAST:event_jtb_indexMouseClicked

    private void jbt_editActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_editActionPerformed
        userstem();
        u.dataSaveValues = ac.ui.utils.getDataFromComss(u.dataComponents);
        jlb_indexinfo.setText(u.setedit(true, true, true));
    }//GEN-LAST:event_jbt_editActionPerformed

    private void jbt_addActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_addActionPerformed
        userstem();

        u.dataSaveValues = ac.ui.utils.getDataFromComss(u.dataComponents);
        jlb_indexinfo.setText(u.setnew(true, true, true));

    }//GEN-LAST:event_jbt_addActionPerformed

    private void jbt_deleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_deleteActionPerformed
        userstem();
        jlb_indexinfo.setText(u.setdelete(true, true, true));
    }//GEN-LAST:event_jbt_deleteActionPerformed

    private void jcom_langActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcom_langActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jcom_langActionPerformed

    private void jcom_userTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcom_userTypeActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jcom_userTypeActionPerformed

    private void jcom_userTypepActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcom_userTypepActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jcom_userTypepActionPerformed

    private void jbt_cancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_cancelActionPerformed
        /*   userstem();
         u.dataSaveValues = ac.ui.utils.getDataFromComss(u.dataComponents);

         jlb_indexinfo.setText(u.setnew( true, true, true));*/
        u.setcancel();
    }//GEN-LAST:event_jbt_cancelActionPerformed

    private void jbt_fristActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_fristActionPerformed
        userstem();
        jlb_indexinfo.setText(u.FrameDataupdate("frist"));

    }//GEN-LAST:event_jbt_fristActionPerformed

    private void jbt_prevMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jbt_prevMouseClicked
        // TODO add your handling code here:
        userstem();
        jlb_indexinfo.setText(u.FrameDataupdate("perv"));


    }//GEN-LAST:event_jbt_prevMouseClicked

    private void jbt_prevActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_prevActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jbt_prevActionPerformed

    private void jbt_nextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_nextActionPerformed
        userstem();
        jlb_indexinfo.setText(u.FrameDataupdate("next"));
    }//GEN-LAST:event_jbt_nextActionPerformed

    private void jbt_lastActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_lastActionPerformed
        userstem();

        jlb_indexinfo.setText(u.FrameDataupdate("last"));
    }//GEN-LAST:event_jbt_lastActionPerformed

    private void jtb_index1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtb_index1MouseClicked
        preitems();
        jlb_indexinfo1.setText(u.FrameDataupdate());
    }//GEN-LAST:event_jtb_index1MouseClicked

    private void jbt_frist1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_frist1ActionPerformed
        preitems();
        jlb_indexinfo1.setText(u.FrameDataupdate("frist"));
    }//GEN-LAST:event_jbt_frist1ActionPerformed

    private void jbt_prev1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jbt_prev1MouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_jbt_prev1MouseClicked

    private void jbt_prev1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_prev1ActionPerformed
        preitems();
        jlb_indexinfo1.setText(u.FrameDataupdate("prev"));
    }//GEN-LAST:event_jbt_prev1ActionPerformed

    private void jbt_next1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_next1ActionPerformed
        preitems();
        jlb_indexinfo1.setText(u.FrameDataupdate("next"));
    }//GEN-LAST:event_jbt_next1ActionPerformed

    private void jbt_last1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_last1ActionPerformed
        preitems();

        jlb_indexinfo1.setText(u.FrameDataupdate("last"));
    }//GEN-LAST:event_jbt_last1ActionPerformed

    private void jbt_delete1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_delete1ActionPerformed
        preitems();
        jlb_indexinfo.setText(u.setdelete(true, true, true));
    }//GEN-LAST:event_jbt_delete1ActionPerformed

    private void jbt_edit1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_edit1ActionPerformed
        preitems();
        u.dataSaveValues = ac.ui.utils.getDataFromComss(u.dataComponents);
        jlb_indexinfo1.setText(u.setedit(true, true, true));
    }//GEN-LAST:event_jbt_edit1ActionPerformed

    private void jbt_add1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_add1ActionPerformed
        preitems();

        u.dataSaveValues = ac.ui.utils.getDataFromComss(u.dataComponents);
        jlb_indexinfo1.setText(u.setnew(true, true, true));
    }//GEN-LAST:event_jbt_add1ActionPerformed

    private void jbt_cancel1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_cancel1ActionPerformed
        u.setcancel();
    }//GEN-LAST:event_jbt_cancel1ActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private ac.ui.controls.PCLButton jbt_add;
    private ac.ui.controls.PCLButton jbt_add1;
    private ac.ui.controls.PCLButton jbt_cancel;
    private ac.ui.controls.PCLButton jbt_cancel1;
    private ac.ui.controls.PCLButton jbt_delete;
    private ac.ui.controls.PCLButton jbt_delete1;
    private ac.ui.controls.PCLButton jbt_edit;
    private ac.ui.controls.PCLButton jbt_edit1;
    private ac.ui.controls.PCLButton jbt_frist;
    private ac.ui.controls.PCLButton jbt_frist1;
    private ac.ui.controls.PCLButton jbt_last;
    private ac.ui.controls.PCLButton jbt_last1;
    private ac.ui.controls.PCLButton jbt_next;
    private ac.ui.controls.PCLButton jbt_next1;
    private ac.ui.controls.PCLButton jbt_prev;
    private ac.ui.controls.PCLButton jbt_prev1;
    private ac.ui.controls.PCLcomboBox jcom_lang;
    private ac.ui.controls.PCLcomboboxAdd jcom_userType;
    private ac.ui.controls.PCLcomboboxAdd jcom_userTypep;
    private ac.ui.controls.PCLLabel jlb_indexinfo;
    private ac.ui.controls.PCLLabel jlb_indexinfo1;
    private ac.ui.controls.PCLList jlist_actions;
    private ac.ui.controls.PCLList jlst_forms;
    private ac.ui.controls.PCLPasswordField jpa_Password;
    private ac.ui.controls.PCLPasswordField jpa_Passwordrep;
    private ac.ui.controls.PCLTable jtb_index;
    private ac.ui.controls.PCLTable jtb_index1;
    private ac.ui.controls.PCLTextField jtxt_username;
    private ac.ui.controls.PCLPanel left_panel;
    private ac.ui.controls.PCLPanel left_panel1;
    private ac.ui.controls.PCLLabel pCLLabel10;
    private ac.ui.controls.PCLLabel pCLLabel5;
    private ac.ui.controls.PCLLabel pCLLabel6;
    private ac.ui.controls.PCLLabel pCLLabel7;
    private ac.ui.controls.PCLLabel pCLLabel8;
    private ac.ui.controls.PCLLabel pCLLabel9;
    private ac.ui.controls.PCLPanel pCLPanel1;
    private ac.ui.controls.PCLPanel pCLPanel2;
    private ac.ui.controls.PCLPanel pCLPanel3;
    private ac.ui.controls.PCLPanel pCLPanel4;
    private ac.ui.controls.PCLPanel pCLPanel5;
    private ac.ui.controls.PCLTabs pCLTabs1;
    private ac.ui.controls.PCLToolbar pCLToolbar1;
    private ac.ui.controls.PCLToolbar pCLToolbar2;
    private ac.ui.controls.PCLToolbar pCLToolbar3;
    private ac.ui.controls.PCLToolbar pCLToolbar4;
    private ac.ui.controls.PCLPanel right_panel;
    // End of variables declaration//GEN-END:variables
}
